/* 
************ READS ***************
 */
function get_content(url_read, url_write, domain_used, biov_domain, id){
	var q  = '{"query":[{'+
						'"name":null,'+
						'"guid":null,'+
						'"id":"'+id+'",'+
						'"type":"'+biov_domain+'bv_research_group",'+
						'"technology_involved_in":[{"*":null,"optional":true}]'+
						'}]}';

	perform_freebase_read(
		url_read,
		q,
		function (msg) {
			var researchgroup = null;
			researchgroup = msg.result[0];
        	if (!researchgroup) return;
			
			var topic_info = Object();
			
	        //name
	        var name = researchgroup.name;
	        $('#title').text(name);
			
			// IDs
			topic_info.guid = researchgroup.guid;
			
			// Get the overview blurb
			var topic_domain = biov_domain+'bv_research_group';
			jsonp_totalblurb_freebase(domain_used, name, topic_domain, 500,
				function(m){
					$("#thumb").attr('src','http://'+domain_used+'/api/trans/image_thumb'+m.result[0].image.id);
				},
				function(m){
					$("#description").append($('<span>'+m.result.body+'</span>'));
				},
				function(m){}
			);
			
			// Technologies involved in:
	        var technologyList = researchgroup.technology_involved_in;
        	if(technologyList.length > 0) {
	        	var h = '<h2>Technologies Involved In</h2>' +
	        	'<div>';
				for (var i in technologyList) {
					var technology = technologyList[i];
					h += '<a href="'+create_bvr_topic_href('technology', technology.id)+'">' + technology.name + '</a>'
					h += ( i < technologyList.length-1 ? ', ' :"");
				}
				h += '</div>';
				h = $(h)
				$("#technologiesInvolved").append(h); 
			}
			
			// Create edit form:
			create_edit_form(url_write, domain_used, biov_domain, topic_info);			
		},
		function(m){}
	);
}
		